﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace codedynamiks_mes_baguio
{
    partial class frmMain
    {
        void MenuEvents()
        {
            //Default menu
            mnuAbout.Click += new EventHandler(delegate
            {
                frmAboutThis frm = new frmAboutThis();
                frm.Initialize("About " + Common.APPNAME);
                sldMain.AddItem(frm.PanelForm, "About " + Common.APPNAME);
            });
            mnuExit.Click += new EventHandler(delegate
            {
                this.Close();
            });
            mnuSettings.Click += new EventHandler(delegate
            {
                if (!sldMain.ItemList.Contains("Settings"))
                {
                    frmConfig frm = new frmConfig();
                    frm.Initialize("Settings");
                    sldMain.AddItem(frm.PanelForm, "Settings");
                }
            });
            //System specific menu
            mnuInventoryManagement.Click += new EventHandler(delegate
            {
                if (!sldMain.ItemList.Contains("Inventory Management"))
                {
                    frmInventorySystem frm = new frmInventorySystem();
                    frm.Initialize("Inventory Management");
                    sldMain.AddItem(frm.PanelForm, "Inventory Management");
                }
            });
            mnuLookUpDataManager.Click += new EventHandler(delegate
            {
                if (!sldMain.ItemList.Contains("LookUp Data Manager"))
                {
                    frmLookUpManager frm = new frmLookUpManager();
                    frm.Initialize("LookUp Data Manager");
                    sldMain.AddItem(frm.PanelForm, "LookUp Data Manager");
                }
            });
        }
    }
}